package com.lxh.mediator;

/**
 * 中介者模式
 * Create by lxh on 2020/2/15
 */
public class Main {
    public static void main(String[] args) {
        SecurityCouncil UNSC = new SecurityCouncil();

        USA usa = new USA(UNSC);
        Iraq iraq = new Iraq(UNSC);

        UNSC.setUsa(usa);
        UNSC.setIraq(iraq);

        usa.send("不准研制核武器");
        iraq.send("我们没有核武器");
    }
}
